<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html lang="zh-cn" >
<head>
    <meta charset="UTF-8">
    <title>CSSClasses</title>
   <script src="/website/resources/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('myApp',[]);
app.controller('myCtrl',function($http,$scope){
	$scope.login = function(user){
         $http.post("/website/user/test?name="+user.name+"&pwd="+user.pwd).success(function(data, status, headers, config){
            alert("success");
            $http.path("/website/user/test");
        }).error(function(data, status, headers, config){
            alert("error");
        }) 
    }
});


</script>
</head>
<body ng-app="myApp">
    <div ng-controller="myCtrl">
        <form name="loginFm">
            Name:<input  ng-model="user.name" />
            pwd: <input  ng-model="user.pwd" /> 
            <input type="button" value="login" ng-click="login(user)" />
        </form>
    </div>

</body>
</html>